#ifndef AIRFRAME_H
#define AIRFRAME_H


#define COMMAND_ROLL 0
#define COMMAND_PITCH 1
#define COMMAND_YAW 2
#define COMMAND_THRUST 3
#define COMMANDS_NB 4
#define COMMANDS_FAILSAFE {0,0,0,0}


#define SECTION_RC_SETPOINT 1
#define STABILIZATION_ATTITUDE_SP_MAX_PHI 0.7853981625
#define STABILIZATION_ATTITUDE_SP_MAX_THETA 0.7853981625
#define STABILIZATION_ATTITUDE_SP_MAX_R 0.5235988//1.0471976
#define STABILIZATION_ATTITUDE_DEADBAND_A 0
#define STABILIZATION_ATTITUDE_DEADBAND_E 0
#define STABILIZATION_ATTITUDE_DEADBAND_R 50

#define SECTION_ATTITUDE_REFERENCE 1
#define STABILIZATION_ATTITUDE_REF_OMEGA_P 7.853981625
#define STABILIZATION_ATTITUDE_REF_ZETA_P 0.9
#define STABILIZATION_ATTITUDE_REF_MAX_P 10.4719755
#define STABILIZATION_ATTITUDE_REF_MAX_PDOT RadOfDeg(8000.)
#define STABILIZATION_ATTITUDE_REF_OMEGA_Q 7.853981625
#define STABILIZATION_ATTITUDE_REF_ZETA_Q 0.9
#define STABILIZATION_ATTITUDE_REF_MAX_Q 10.4719755
#define STABILIZATION_ATTITUDE_REF_MAX_QDOT RadOfDeg(8000.)
#define STABILIZATION_ATTITUDE_REF_OMEGA_R 7.853981625
#define STABILIZATION_ATTITUDE_REF_ZETA_R 0.9
#define STABILIZATION_ATTITUDE_REF_MAX_R 10.4719755
#define STABILIZATION_ATTITUDE_REF_MAX_RDOT RadOfDeg(8000.)

#define SECTION_STABILIZATION_ATTITUDE_INDI 1
//#define STABILIZATION_INDI_G1_P 0.021652
//#define STABILIZATION_INDI_G1_Q 0.016369
//#define STABILIZATION_INDI_G1_R 0.002856
//#define STABILIZATION_INDI_G2_R 0.000333
#define STABILIZATION_INDI_G1_P 0.034799
#define STABILIZATION_INDI_G1_Q 0.011948
#define STABILIZATION_INDI_G1_R 0.004186
#define STABILIZATION_INDI_G2_R 0.000001
#define STABILIZATION_INDI_FILTER_ROLL_RATE FALSE
#define STABILIZATION_INDI_FILTER_PITCH_RATE FALSE
#define STABILIZATION_INDI_FILTER_YAW_RATE FALSE
#define STABILIZATION_INDI_REF_ERR_P 100.0
#define STABILIZATION_INDI_REF_ERR_Q 100.0
#define STABILIZATION_INDI_REF_ERR_R 100.0
#define STABILIZATION_INDI_REF_RATE_P 14.0
#define STABILIZATION_INDI_REF_RATE_Q 14.0
#define STABILIZATION_INDI_REF_RATE_R 14.0
#define STABILIZATION_INDI_FILT_CUTOFF 3.2
#define STABILIZATION_INDI_FILT_CUTOFF_R 3.2
#define STABILIZATION_INDI_ACT_DYN_P 0.1f
#define STABILIZATION_INDI_ACT_DYN_Q 0.1f
#define STABILIZATION_INDI_ACT_DYN_R 0.1f
#define STABILIZATION_INDI_USE_ADAPTIVE FALSE
#define STABILIZATION_INDI_ADAPTIVE_MU 0.0001
#define STABILIZATION_INDI_STABILIZATION_INDI_MAX_RATE 5.99991836272
#define STABILIZATION_INDI_STABILIZATION_INDI_MAX_R 0.5235988//1.0471976

#define USE_INDI TRUE


#endif // AIRFRAME_H
